package com.hu.zhcc.shiro.service;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.hu.zhcc.shiro.dao.TJ_TMemberMapper;
import com.hu.zhcc.shiro.dao.Tj_TMemberMedicalhistoryMapper;
import com.hu.zhcc.shiro.entity.tj.TMember;
import com.hu.zhcc.shiro.entity.tj.TMemberMedicalhistory;
import com.hu.zhcc.shiro.entity.tj.VipdaTj;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 会员病史表 服务实现类
 * </p>
 *
 * @author tj
 * @since 2021-06-15
 */
@Service
public class Tj_TMemberMedicalhistoryServiceImpl extends ServiceImpl<Tj_TMemberMedicalhistoryMapper, TMemberMedicalhistory> implements Tj_TMemberMedicalhistoryService {
    @Autowired
    private Tj_TMemberMedicalhistoryMapper memberMedicalhistoryMapper;
    @Autowired
    private TJ_TMemberMapper tj_tMemberMapper;//会员表
    @Override
    public int updMedicalhistory(TMemberMedicalhistory tMemberMedicalhistory) {
        return memberMedicalhistoryMapper.updMedicalhistory(tMemberMedicalhistory);
    }

    @Override
    public TMemberMedicalhistory queryByIdhistory(int id) {
        return memberMedicalhistoryMapper.queryByIdhistroy(id);
    }

    @Override
    public int inserthistory(TMemberMedicalhistory record) {
        record.settMemberId(tj_tMemberMapper.getMysqlId());
        System.out.println(tj_tMemberMapper);
        return memberMedicalhistoryMapper.inserthistory(record);
    }

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return memberMedicalhistoryMapper.deleteByPrimaryKey(id);
    }
}
